<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <link th:href="@{/images/userLog1.png}"  sizes="90x90" type="image/x-icon" rel="icon">
    <link th:href="@{/frontstatic/css/iconfont.css}" rel="stylesheet">
    <link th:href="@{/frontstatic/css/global.css}" rel="stylesheet">
    <link th:href="@{/frontstatic/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/frontstatic/css/bootstrap-theme.min.css}" rel="stylesheet">
    <link th:href="@{/frontstatic/css/swiper.min.css}" rel="stylesheet">
    <link th:href="@{/frontstatic/css/styles.css}" rel="stylesheet">
    <script charset="utf-8" th:src="@{/lib/layui-v2.6.3/layui.js}"></script>
    <link media="all" rel="stylesheet" th:href="@{/lib/layui-v2.6.3/css/layui.css}">
    <script charset="utf-8" th:src="@{/lib/jquery-3.4.1/jquery-3.4.1.min.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/bootstrap.min.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/swiper.min.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/global.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/jquery.DJMask.2.1.1.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/notify.js}"></script>
    <script charset="UTF-8" th:src="@{/frontstatic/js/notify_stand.js}"></script>
    <title>售后</title>
</head>
<body>
<!-- 顶部tab -->
<div th:replace="~{head::headdeg}"></div>
<!-- 顶部标题 -->
<div class="bgf5 clearfix">
    <div class="top-user">
        <div class="inner">
            <div class="title">个人中心</div>
        </div>
    </div>
</div>
<div class="content clearfix bgf5">
    <section class="user-center inner clearfix">
        <div class="pull-left bgf">
            <dl class="user-center__nav">
                <dt>帐户信息</dt>
                <a href="/skippage?url=udai_setting">
                    <dd>个人资料</dd>
                </a>
                <a href="/skippage?url=udai_address">
                    <dd>收货地址</dd>
                </a>
            </dl>
            <dl class="user-center__nav">
                <dt>订单中心</dt>
                <a href="/skippage?url=udai_order">
                    <dd>我的订单</dd>
                </a>
                <a href="/skippage?url=udai_refund">
                    <dd class="active">售后</dd>
                </a>
            </dl>
        </div>
        <div class="pull-right">
            <div class="user-content__box clearfix bgf" >
                <div class="title">订单中心-售后</div>
                <div class="order-list__box bgf" >
                    <div class="order-panel" >
                        <ul class="nav user-nav__title" role="tablist">
                            <li class="nav-item active" role="presentation"><a aria-controls="all" data-toggle="tab"
                                                                               href="#all" role="tab">所有订单</a>
                            </li>
                        </ul>

                        <div class="tab-content">
                                <table class="layui-table" id="refundTable" lay-filter="refundTable" lay-skin="nob"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
</body>
<script id="barlist" type="text/html">
    {{#  if(d.cargoStatusId == 1&&d.statics==2){ }}
    <a style="color: #928f8f" lay-event="del">填写单号</a>
    {{#  } }}
</script>
<script>
    var notify;
    layui.use(['notify'],function(){
        notify=layui.notify;
    })
    layui.use('table', function () {
        var table = layui.table;
        var layer = layui.layer;
        var data={
            "flag":10
        }
        table.render({
            elem: '#refundTable'
            , method: 'post'
            , title: '售后数据表'
            , url: '/reterngood/page' //数据接口
            , page: {theme: '#585a5c'}
            ,where:data
            ,contentType:'application/json'
            , limit: 5
            ,skin:"line"
            ,parseData: function(res){ //res 即为原始返回的数据
                return {
                    "code": res.code, //解析接口状态
                    "msg": res.msg, //解析提示文本
                    "count": res.data.total, //解析数据长度
                    "data": res.data.records//解析数据列表
                };
            }
            , cols: [
                [ //表头
                    {field: 'number',width :100,title: '售后单编号'}
                    , {field: 'orderUuid',width :100,title: '订单编号'}
                    , {field: 'refund',width :100,title: '售后方式'}
                    , {field: 'reason',width :100,title: '申请理由'}
                    , {field: 'amount',title: '金额'}
                    , {field: 'staticsString',title: '售后状态'}
                    , {field: 'ceaterTime',width :150,title: '申请时间'}
                    , {fixed: 'right', toolbar: '#barlist',width: 100}
                ]
            ]
        });
        //监听行工具事件
        table.on('tool(refundTable)', function(obj){
            var data = obj.data;
            if(obj.event === 'del'){
                layer.open({
                    type: 2,
                    title: '填写物流单号',
                    fixed: false, //不固定
                    maxmin: true, //开启最大化最小化按钮
                    area: ['800px', '60%'],
                    scrollbar: false, //屏蔽滚动条
                    content: '/skippage?url=ipoutfrom&id='+data.id+'&orderid='+data.orderId
                });
            }
        });
    })
</script>
</html>